﻿@model SKeeper.Application.ViewModels.Invoice.InvoiceViewModel

<div>
    <h4>InvoiceViewModel</h4>
    <hr />
    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.Code)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Code)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.WarehouseId)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.WarehouseId)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.WarehouseName)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.WarehouseName)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.CreateDate)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.CreateDate)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.DueDate)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.DueDate)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.IsActive)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.IsActive)
        </dd>

    </dl>
    <div class="table-responsive">
        <table class="table table-striped">

            <thead>
                <tr>
                    <th>
                        Име
                    </th>
                    <th>
                        Количина
                    </th>
                    <th>
                        Цена парче
                    </th>
                    <th>
                        Цена б/д
                    </th>
                    
                    <th>
                        Цена с/д
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach(var item in Model.Items)
                {
                    <tr>
                        <td>
                            @item.Name
                        </td>
                        <td>
                            @item.Quantity
                        </td>
                        <td>
                            @item.IndividualPrice
                        </td>
                        <td>
                            @item.Price
                        </td>                        
                        <td>
                            @item.PriceWithTax
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
</div>
<p>
    @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) |
    @Html.ActionLink("Back to List", "Index")
</p>
